package com.ruoyi.project.knowledge.service;

import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.knowledge.domain.KnowledgeAttach;
import com.ruoyi.project.knowledge.domain.KnowledgeBase;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IKnowledgeBaseService {
    /**
     * 查询知识库
     * @param knowledge
     * @return
     */
    List<KnowledgeBase> selectKnowledgeList(KnowledgeBase knowledge);

    List<KnowledgeBase> selectPublicKnowledgeList(KnowledgeBase knowledge);

    List<KnowledgeBase> searchKnowledgeList(String searchValue);

    /**
     * 查询知识库明细
     * @param id
     * @return
     */
    KnowledgeBase selectKnowledgeById(@Param("id") String id);

    /**
     * 新增知识库
     * @param knowledge
     * @return
     */
    AjaxResult insertKnowledge(KnowledgeBase knowledge, List<KnowledgeAttach> attachList);

    /**
     * 修改知识库
     * @param knowledge
     * @return
     */
    AjaxResult updateKnowledge(KnowledgeBase knowledge, List<KnowledgeAttach> attachList);

    /**
     * 删除知识库
     * @param id
     * @return
     */
    int deleteKnowledge(@Param("id") String id);
}
